using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GuidCommonSaveComp : GuidSaveCompAbs
{
    public override Dictionary<string, object> SaveData()
    {
        Dictionary<string, object> saveData = new Dictionary<string, object>();
        saveData.Add("Position", JsonUtility.ToJson(transform.position));
        return saveData;
    }

    public override void LoadData(Dictionary<string, object> data)
    {
        if (data != null)
        {
            if (data.ContainsKey("Position"))
            {
                transform.position = JsonUtility.FromJson<Vector3>((string)data["Position"]);
            }
        }
    }
}